home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / wgdb-42.lha / wgdb-4.2 / gdb / Makefile.in < prev    next >
Makefile  |  1992-09-11  |  24KB  |  676 lines

  1. ##Copyright (C) 1989-1991 Free Software Foundation, Inc.
  2.  
  3. # This file is part of GDB.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  
  17. # Host and target-dependent makefile fragments come in here.
  18. ####
  19. # End of host and target-dependent makefile fragments
  20.  
  21. # Destination directory of the software tree build
  22. destdir = /usr/local
  23.  
  24. # Place to install binaries in the destination tree. 
  25. bindir=$(destdir)/bin
  26.  
  27. # System V: If you compile gdb with a compiler which uses the coff
  28. # encapsulation feature (this is a function of the compiler used, NOT
  29. # of the m-?.h file selected by config.gdb), you must make sure that
  30. # the GNU nm is the one that is used by munch.
  31.  
  32. # If you are compiling with GCC, make sure that either 1) You use the
  33. # -traditional flag, or 2) You have the fixed include files where GCC
  34. # can reach them.  Otherwise the ioctl calls in inflow.c
  35. # will be incorrectly compiled.  The "fixincludes" script in the gcc
  36. # distribution will fix your include files up.
  37. #CC=cc
  38. #CC=gcc -traditional
  39. GCC=gcc
  40.  
  41. # Directory containing source files.  Don't clean up the spacing,
  42. # this exact string is matched for by the "configure" script.
  43. srcdir = .
  44.  
  45. # It is also possible that you will need to add -I/usr/include/sys to the
  46. # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which 
  47. # is where it should be according to Posix).
  48.  
  49. BISON=bison -y
  50. BISONFLAGS=
  51. YACC=$(BISON) $(BISONFLAGS)
  52. # YACC=yacc
  53. SHELL=/bin/sh
  54. MAKE=make
  55.  
  56. # Documentation (gdb.dvi) needs either GNU m4 or SysV m4; 
  57. # Berkeley/Sun don't have quite enough. 
  58. #M4=/usr/5bin/m4
  59. M4=gm4
  60.  
  61. # where to find texinfo; GDB dist should include a recent one
  62. TEXIDIR=${srcdir}/../texinfo/fsf
  63.  
  64. # where to find makeinfo, preferably one designed for texinfo-2
  65. MAKEINFO=makeinfo
  66.  
  67. # Set this up with gcc if you have gnu ld and the loader will print out
  68. # line numbers for undefinded refs.
  69. #CC-LD=gcc -static
  70. CC-LD=${CC}
  71.  
  72. # define this to be "gmalloc.o" if you want to use the gnu malloc routine
  73. # (useful for debugging memory allocation problems in gdb).  To use your
  74. # system malloc, uncomment the following two lines.
  75. #GNU_MALLOC =
  76. #MALLOC_CFLAGS = -DNO_MALLOC_CHECK
  77. GNU_MALLOC = gmalloc.o mcheck.o mtrace.o
  78. MALLOC_CFLAGS =
  79.  
  80. # Where is the "include" directory?  Traditionally ../include or ./include
  81. INCLUDE_DIR =  ${srcdir}/../include
  82. INCLUDE_DEP = $$(INCLUDE_DIR)
  83.  
  84. # Where is the source dir for the BFD library?  Traditionally ../bfd or ./bfd
  85. # (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.)
  86. BFD_DIR =  ${srcdir}/../bfd
  87. BFD_DEP = $$(BFD_DIR)
  88. BFD_LIB = $(BFD_DIR)${subdir}/libbfd.a
  89.  
  90. # Where is the source dir for the READLINE library?  Traditionally in .. or .
  91. # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
  92. READLINE_DIR = ${srcdir}/../readline
  93. READLINE_DEP = $$(READLINE_DIR)
  94. RL_LIB = $(READLINE_DIR)${subdir}/libreadline.a
  95.  
  96. # All the includes used for CFLAGS and for lint.
  97. # -I. for config files.
  98. # -I${srcdir} possibly for regex.h also.
  99. INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR) -I${srcdir}/vx-share
  100.  
  101. # {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS.
  102. # CFLAGS for GDB
  103. GLOBAL_CFLAGS = -g ${TM_CFLAGS} ${XM_CFLAGS}
  104. #PROFILE_CFLAGS = -pg
  105.  
  106. CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS}
  107. # None of the things in CFLAGS will do any harm, and on some systems
  108. #  (e.g. SunOS4) it is important to use the M_CFLAGS.
  109. LDFLAGS = $(CFLAGS)
  110.  
  111. # Where is the "-liberty" library, containing getopt and obstack?
  112. LIBIBERTY_DIR = ${srcdir}/../libiberty
  113. LIBIBERTY = ${LIBIBERTY_DIR}${subdir}/libiberty.a
  114.  
  115. # Flags that describe where you can find the termcap library.
  116. # You may need to make other arrangements for USG.
  117. TERMCAP = -ltermcap
  118.  
  119. # The xconfig file must define REGEX and REGEX1 on USG machines.
  120. # If your sysyem is missing alloca(), or, more likely, it's there but
  121. # it doesn't work, define ALLOCA & ALLOCA1 too.
  122. # If your system is missing putenv(), add putenv.c to XM_ADD_FILES.
  123.  
  124. # Libraries and corresponding dependencies for compiling gdb.
  125. # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
  126. # TERMCAP comes after readline, since readline depends on it.
  127. CLIBS = ${BFD_LIB} ${LIBIBERTY} ${RL_LIB} ${TERMCAP} ${XM_CLIBS} ${TM_CLIBS}
  128. CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB}
  129.  
  130. ADD_FILES = ${REGEX} ${ALLOCA}  ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
  131. ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
  132.  
  133. VERSION = 4.2
  134. DIST=gdb
  135.  
  136. LINT=/usr/5bin/lint
  137. LINTFLAGS=
  138.  
  139. # Source files in the main directory.
  140. # Files which are included via a tconfig/* or xconfig/* file 
  141. # should *not* be specified here; they're in "ALLDEPFILES".
  142. SFILES_MAINDIR = \
  143.      blockframe.c breakpoint.c command.c core.c \
  144.      environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
  145.      main.c printcmd.c \
  146.      remote.c source.c stack.c symmisc.c symtab.c symfile.c \
  147.      utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
  148.      signame.c cplus-dem.c mem-break.c target.c inftarg.c \
  149.      dbxread.c coffread.c \
  150.      ieee-float.c language.c parse.c lisp.c
  151.  
  152. # Source files in subdirectories (which will be handled separately by
  153. #  'make gdb.tar.Z').
  154. # Files which are included via a tconfig/* or xconfig/* file 
  155. # should *not* be specified here; they're in "ALLDEPFILES".
  156. SFILES_SUBDIR = \
  157.      ${srcdir}/vx-share/dbgRpcLib.h \
  158.      ${srcdir}/vx-share/ptrace.h \
  159.      ${srcdir}/vx-share/reg.h \
  160.      ${srcdir}/vx-share/vxTypes.h \
  161.      ${srcdir}/vx-share/vxWorks.h \
  162.      ${srcdir}/vx-share/wait.h \
  163.      ${srcdir}/vx-share/xdr_ld.h \
  164.      ${srcdir}/vx-share/xdr_ptrace.h \
  165.      ${srcdir}/vx-share/xdr_rdb.h \
  166.      ${srcdir}/vx-share/xdr_regs.h \
  167.      ${srcdir}/nindy-share/b.out.h \
  168.      ${srcdir}/nindy-share/block_io.h \
  169.      ${srcdir}/nindy-share/coff.h \
  170.      ${srcdir}/nindy-share/demux.h \
  171.      ${srcdir}/nindy-share/env.h \
  172.      ${srcdir}/nindy-share/stop.h \
  173.      ${srcdir}/nindy-share/ttycntl.h
  174.  
  175. # Non-source files in subdirs, that should go into gdb.tar.Z.
  176. NONSRC_SUBDIR = \
  177.      ${srcdir}/nindy-share/Makefile \
  178.      ${srcdir}/nindy-share/VERSION
  179.  
  180. # All source files that go into linking GDB, except config-specified files.
  181. SFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR)
  182.  
  183. # All source files that lint should look at
  184. LINTFILES = $(SFILES) $(YYFILES) init.c
  185.  
  186. # Any additional files specified on these lines should also be added to
  187. # the OTHERS = definition below, so they go in the tar files.
  188. SFILES_STAND = $(SFILES) standalone.c
  189. SFILES_KGDB  = $(SFILES) stuff.c kdb-start.c
  190.  
  191. # Header files that are not named in tconfig/* or xconfig/* go here.
  192. HFILES=    breakpoint.h command.h defs.h environ.h \
  193.     expression.h frame.h gdbcmd.h gdbcore.h getpagesize.h \
  194.     ieee-float.h inferior.h minimon.h param-no-tm.h param.h \
  195.     signals.h signame.h symfile.h symtab.h \
  196.     target.h tdesc.h terminal.h tm-68k.h tm-i960.h tm-sunos.h \
  197.     language.h parser-defs.h value.h
  198.  
  199. # Header files for machine opcode tables.
  200. # when OPCODE_DIR changes to ../include, remove the whole $(OPCODES)
  201. # business, since they will be included in the separate includes tar file
  202. # rather than in the gdb tar file.
  203. OPCODE_DIR =
  204. OPCODES = $(OPCODE_DIR)pn-opcode.h $(OPCODE_DIR)np1-opcode.h \
  205.     $(OPCODE_DIR)sparc-opcode.h $(OPCODE_DIR)vax-opcode.h \
  206.     $(OPCODE_DIR)m68k-opcode.h $(OPCODE_DIR)ns32k-opcode.h \
  207.     $(OPCODE_DIR)convx-opcode.h $(OPCODE_DIR)pyr-opcode.h \
  208.     $(OPCODE_DIR)mips-opcode.h $(OPCODE_DIR)am29k-opcode.h \
  209.     $(OPCODE_DIR)arm-opcode.h $(OPCODE_DIR)m88k-opcode.h \
  210.     $(OPCODE_DIR)tahoe-opcode.h
  211.  
  212. REMOTE_EXAMPLES = m68k-stub.c i386-stub.c rem-multi.shar
  213.  
  214. MALLOCSRC = gmalloc.c mcheck.c mtrace.c mtrace.awk \
  215.         ansidecl.h gmalloc.h
  216.  
  217. POSSLIBS_MAINDIR = regex.c regex.h alloca.c $(MALLOCSRC)
  218. POSSLIBS = $(POSSLIBS_MAINDIR)
  219.  
  220. TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
  221.  
  222. # tdesc-lib cannot be named simply tdesc, because if it were, GNU make
  223. # would try to make it from tdesc.c.
  224. # tdesc-lib removed from the list due to Motorola copyrights...gnu@cygnus.com
  225. OTHERS = Makefile.in depend alldeps.mak createtags munch configure.in \
  226.      ChangeLog ChangeLog-3.x refcard.ps \
  227.      README TODO TAGS WHATS.NEW Projects \
  228.      .gdbinit COPYING $(YYFILES) \
  229.      copying.c Convex.notes copying.awk \
  230.      saber.suppress standalone.c stuff.c kdb-start.c \
  231.      putenv.c
  232.  
  233. # Subdirectories of gdb, which should be included in their entirety in
  234. # gdb-xxx.tar.Z:
  235. TARDIRS = doc # tests
  236.  
  237. # GDB "info" files, which should be included in their entirety
  238. INFOFILES = gdb.info*
  239.  
  240. DEPFILES= ${TDEPFILES} ${XDEPFILES}
  241.  
  242. SOURCES=$(SFILES) $(ALLDEPFILES) $(YYFILES)
  243. TAGFILES = $(SOURCES) ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS} 
  244. TAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
  245.              ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS_MAINDIR} 
  246. TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
  247.  
  248. OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
  249.     values.o eval.o valops.o valarith.o valprint.o printcmd.o \
  250.     symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
  251.     command.o utils.o expprint.o environ.o version.o \
  252.     copying.o $(DEPFILES) signame.o cplus-dem.o mem-break.o target.o \
  253.     inftarg.o ieee-float.o putenv.o parse.o lisp.o language.o $(YYOBJ) \
  254.     dbxread.o coffread.o # mipsread.o
  255.  
  256. RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
  257.  
  258. TSOBS = core.o inflow.o
  259.  
  260. NTSOBS = standalone.o
  261.  
  262. TSSTART = /lib/crt0.o
  263.  
  264. NTSSTART = kdb-start.o
  265.  
  266. # For now, shortcut the "configure GDB for fewer languages" stuff.
  267. YYFILES = c-exp.tab.c m2-exp.tab.c
  268. YYOBJ = c-exp.tab.o m2-exp.tab.o
  269.  
  270. # Prevent Sun make from putting in the machine type.  Setting
  271. # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
  272. .c.o:
  273.     ${CC} -c ${CFLAGS} $<
  274.  
  275. all: gdb
  276.  
  277. install: gdb
  278.     cp gdb $(bindir)/gdb.new
  279.     mv $(bindir)/gdb.new $(bindir)/gdb
  280.     $(M_INSTALL)
  281.  
  282. init.c: $(srcdir)/munch $(OBS) $(TSOBS)
  283.     $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
  284.  
  285. gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
  286.     ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \
  287.       $(CLIBS) $(LOADLIBES)
  288.  
  289. saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
  290.     #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
  291.     #load ./init.c $(SFILES)
  292.     #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/vx-share/*.h
  293.     #unload ${srcdir}/nindy-share/[A-Z]*
  294.     #load ${srcdir}/c-exp.tab.c ${srcdir}/m2-exp.tab.c
  295.     #load copying.c version.c
  296.     #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
  297.     #load ${LIBIBERTY_DIR}/*.c
  298.     #load ${BFD_DIR}/*.c
  299.     #load ${READLINE_DIR}/*.c
  300.     #load -ltermcap 
  301.     ##void mcheck(a) void (*a)(); { }
  302.     ##void mtrace() { }
  303.  
  304.  
  305.  
  306. # This is useful when debugging GDB, because some Unix's don't let you run GDB
  307. # on itself without copying the executable.  So "make gdb1" will make
  308. # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
  309. # Removing gdb1 before the copy is the right thing if gdb1 is open
  310. # in another process.
  311. gdb1: gdb
  312.     rm -f gdb1
  313.     cp gdb gdb1
  314.  
  315. # This is a remote stub which runs under unix and starts up an
  316. # inferior process.  This is at least useful for debugging GDB's
  317. # remote support.
  318. rapp: $(RAPP_OBS)
  319.     rm -f rapp_init.c
  320.     ${srcdir}/munch ${MUNCH_DEFINE} ${RAPP_OBS} > rapp_init.c
  321.     ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
  322.     
  323. # Support for building Makefile out of configured pieces, automatically
  324. # generated dependencies, etc.  alldeps.mak is a file that contains
  325. # "make" variable definitions for all ALLDEPFILES, ALLDEPFILES_MAINDIR,
  326. # ALLDEPFILES_SUBDIR, ALLPARAM, and ALLCONFIG, all cadged from the current
  327. # contents of the xconfig and tconfig subdirectories.
  328.  
  329. alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
  330.     rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
  331.     for i in `ls -d ${srcdir}/tconfig/*[0-9A-Za-z] \
  332.             ${srcdir}/xconfig/*[0-9A-Za-z] | \
  333.         grep -v RCS | grep -v CVS.adm | grep -v SCCS` ; do \
  334.       echo $$i >>allconfig.tmp; \
  335.       awk <$$i ' \
  336.         $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" { \
  337.           for (i = 2; i <= NF; i++) \
  338.             print $$i >> "alldeps.tmp" ; \
  339.             } \
  340.         $$1 == "TM_FILE=" || $$1 == "XM_FILE=" { \
  341.           print $$2 >> "allparam.tmp" }' ; \
  342.     done
  343.     sort <alldeps.tmp | uniq | \
  344.       sed -e 's/arm-convert.o/arm-convert.s/' \
  345.           -e 's!^Onindy.o!nindy-share/Onindy.c!' \
  346.           -e 's!^nindy.o!nindy-share/nindy.c!' \
  347.           -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
  348.           -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
  349.           -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
  350.           -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
  351.           -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
  352.           -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
  353.           -e 's/\.o/.c/' \
  354.         >alldeps2.tmp
  355.     echo '# Start of "alldeps.mak" definitions' \
  356.         >>alldeps.mak;
  357.     echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
  358.         >>alldeps.mak;
  359.     grep -v / alldeps2.tmp | \
  360.       awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
  361.         NR == 0 {printf $$0;} \
  362.         NR != 0 {printf "\\\n" $$0} \
  363.         END {printf "\n\n"}' >>alldeps.mak;
  364.     grep / alldeps2.tmp | \
  365.       awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
  366.         NR == 0 {printf $$0;} \
  367.         NR != 0 {printf "\\\n" $$0} \
  368.         END {printf "\n\n"}' >>alldeps.mak;
  369.     sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
  370.         NR == 0 {printf $$0;} \
  371.         NR != 0 {printf "\\\n" $$0} \
  372.         END {printf "\n\n"}' >>alldeps.mak;
  373.     sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
  374.         NR == 0 {printf $$0;} \
  375.         NR != 0 {printf "\\\n" $$0} \
  376.         END {printf "\n\n"}' >>alldeps.mak;
  377.     echo '# End of "alldeps.mak" definitions' \
  378.         >>alldeps.mak;
  379.     rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
  380.  
  381. # The sed script makes everything which depends on {x,t}m.h depend on
  382. # config.status as well, in case someone reconfigures gdb out from
  383. # under an already compiled gdb.
  384. depend: $(SOURCES) Makefile.in
  385.     @echo Ignore errors about non-existent system-supplied include files
  386.     @echo for systems other than the one you are using.
  387.     @echo "If xm.h and tm.h don't exist, the error messages saying so"
  388.     @echo can safely be ignored.
  389.     @echo Also ignore parse errors in valops.c, and any errors in
  390.     @echo arm-convert.s.
  391.     -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \
  392.       `ls $(SOURCES) | grep -v '\.[hy]$$' |sort -u` >depend.tmp
  393. # If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
  394. # for xm.h and tm.h.  This allows the same "depend" file to be used
  395. # by the various subdirectories.
  396.     if [ "${srcdir}" = "." ] ; then \
  397.       <depend.tmp sed \
  398.         -e 's; ./xm.h; xm.h;g'  \
  399.         -e 's; ./tm.h; tm.h;g'  \
  400.         -e 's; \./; $${srcdir}/;g'  \
  401.         -e 's; vx-share/; $${srcdir}/vx-share/;g'  \
  402.         -e 's; nindy-share/; $${srcdir}/nindy-share/;g'  \
  403.         >depend.tm2; \
  404.       rm depend.tmp; \
  405.       mv depend.tm2 depend.tmp; \
  406.     fi
  407.     <depend.tmp sed \
  408.       -e 's; [xt]m.h;& config.status;g'  \
  409.       -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g'  \
  410.       -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g'  \
  411.       -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g'  \
  412.       -e 's; ./xm.h; xm.h config.status;g'  \
  413.       -e 's; ./tm.h; tm.h config.status;g'  \
  414.       >depend
  415.     rm depend.tmp
  416.  
  417. config.status:
  418.     @echo "You must configure gdb.  Look at the README file for details."
  419.     @false
  420.  
  421. # These are not generated by "make depend" because they only are there
  422. # for some machines.
  423. # But these rules don't do what we want; we want to hack the foo.o: tm.h
  424. # dependency to do the right thing.
  425. tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h : tm-68k.h
  426. tm-hp300hpux.h tm-sun2.h tm-3b1.h : tm-68k.h
  427. xm-news1000.h : xm-news.h
  428. xm-i386-sv32.h : xm-i386.h
  429. tm-i386gas.h: tm-i386.h
  430. xm-sun4os4.h : xm-sparc.h
  431. tm-sun4os4.h : tm-sparc.h
  432.  
  433. kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
  434.     rm -f init.c
  435.     $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
  436.     $(CC) $(LDFLAGS) -c init.c $(CLIBS) 
  437.     ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
  438.       -lc $(CLIBS)
  439.  
  440. # Put the proper machine-specific files first.
  441. # createtags will edit the .o in DEPFILES into .c
  442. TAGS: ${TAGFILES}
  443.     $(srcdir)/createtags $(TM_FILE) ${XM_FILE} $(DEPFILES) ${TAGFILES}
  444. tags: TAGS
  445.  
  446. # Making distributions of GDB and friends.
  447.  
  448. # Make a directory `proto-gdb.dir' that contains an image of the GDB
  449. # directory of the distribution, built up with symlinks.
  450. make-proto-gdb.dir: force_update 
  451.     $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
  452.     $(MAKE) $(MFLAGS) -f Makefile    make-proto-gdb-1
  453.  
  454. # Make a tar file containing the GDB directory of the distribution.
  455. gdb.tar.Z: force_update
  456.     $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
  457.     $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
  458.  
  459. # Set up the GDB directory for distribution, by building all files that
  460. # are products of other files.
  461. setup-to-dist: force_update
  462.     ../configure none
  463.     rm -f alldeps.mak
  464.     $(MAKE) $(MFLAGS) alldeps.mak
  465.     ../configure none
  466.     rm -f depend
  467.     $(MAKE) $(MFLAGS) depend
  468.     ../configure none
  469.     (cd doc; $(MAKE) $(MFLAGS) rdl-apps.texi gdbVN.m4)
  470.     $(MAKE) $(MFLAGS) gdb.info
  471.     $(MAKE) $(MFLAGS) refcard.ps
  472.  
  473. # Build a tar file from a proto-gdb.dir.
  474. gdb-$(VERSION).tar.Z: force_update
  475.     rm -f gdb.tar gdb-$(VERSION).tar.Z
  476.     $(MAKE) $(MFLAGS) -f Makefile    make-proto-gdb-1
  477.     ln -s proto-gdb.dir $(DIST)
  478.     tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
  479.     rm -rf $(DIST) proto-gdb.dir
  480.  
  481. # Build a proto-gdb.dir after GDB has been set up for distribution.
  482. # This stuff must be run in `Makefile', not `Makefile.in`; we use the makefile
  483. # built in the setup-to-dist process, since it defines things like ALLCONFIG
  484. # and ALLDEPFILES, that we need.
  485. make-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info
  486.     rm -rf proto-gdb.dir
  487.     mkdir proto-gdb.dir
  488.     cd proto-gdb.dir ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
  489.     cd proto-gdb.dir ; ln -s ../${INFOFILES} .
  490.     cd proto-gdb.dir ; for i in ${TARDIRS}; do \
  491.       (mkdir $$i; cd $$i; \
  492.       ln -s ../../$$i/* .; \
  493.       rm -rf SCCS CVS.adm RCS); done
  494.     mkdir proto-gdb.dir/xconfig proto-gdb.dir/tconfig
  495.     cd proto-gdb.dir/tconfig ; \
  496.       for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done
  497.     mkdir proto-gdb.dir/vx-share proto-gdb.dir/nindy-share
  498.     cd proto-gdb.dir/tconfig ; \
  499.       for i in $(SFILES_SUBDIR) $(NONSRC_SUBDIR) $(ALLDEPFILES_SUBDIR); \
  500.         do ln -s ../../$$i ../$$i ; done
  501.     chmod og=u `find . -print`
  502.  
  503. clean:
  504.     rm -f ${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES}
  505.     rm -f init.c init.o version.c
  506.     rm -f gdb core gdb.tar gdb.tar.Z make.log
  507.     rm -f gdb[0-9]
  508.     cd $(srcdir)/doc; $(MAKE) clean
  509.  
  510. distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
  511.     rm -f tm.h xm.h config.status
  512.     rm -f y.output yacc.acts yacc.tmp
  513.     rm -f ${TESTS} Makefile depend
  514.  
  515. realclean: clean
  516.     rm -f c-exp.tab.c m2-exp.tab.c TAGS
  517.     rm -f tm.h xm.h config.status
  518.     rm -f Makefile depend
  519.  
  520. STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
  521.  
  522. # Copy the object files from a particular stage into a subdirectory.
  523. stage1: force
  524.     -mkdir stage1
  525.     -mv -f $(STAGESTUFF) stage1
  526.  
  527. stage2: force
  528.     -mkdir stage2
  529.     -mv -f $(STAGESTUFF) stage2
  530.  
  531. stage3: force
  532.     -mkdir stage3
  533.     -mv -f $(STAGESTUFF) stage3
  534.  
  535. against=stage2
  536.  
  537. comparison: force
  538.     for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
  539.  
  540. de-stage1: force
  541.     - (cd stage1 ; mv -f * ..)
  542.     - rmdir stage1
  543.  
  544. de-stage2: force
  545.     - (cd stage2 ; mv -f * ..)
  546.     - rmdir stage2
  547.  
  548. de-stage3: force
  549.     - (cd stage3 ; mv -f * ..)
  550.     - rmdir stage3
  551.  
  552. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  553.     $(SHELL) ./config.status
  554.  
  555. force:
  556.  
  557. # Documentation!
  558. # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
  559. refcard.dvi : $(srcdir)/doc/refcard.tex
  560.     ( cd $(srcdir)/doc; $(MAKE) refcard.dvi )
  561.     mv $(srcdir)/doc/refcard.dvi .
  562.  
  563. # GDB QUICK REFERENCE (PostScript output, common PS fonts)
  564. refcard.ps : $(srcdir)/doc/refcard.tex
  565.     ( cd $(srcdir)/doc; $(MAKE) refcard.ps )
  566.     mv $(srcdir)/doc/refcard.ps .
  567.  
  568. # GDB MANUAL: TeX dvi file
  569. gdb.dvi : $(srcdir)/doc/gdb-all.texi $(srcdir)/doc/rdl-apps.texi
  570.     ( cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb.dvi )
  571.     mv $(srcdir)/doc/gdb.dvi .
  572.  
  573. # GDB MANUAL: info file
  574. gdb.info: $(srcdir)/doc/gdb-all.texi
  575.     ( cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb.info )
  576.     mv $(srcdir)/doc/gdb.info* .
  577.  
  578. $(srcdir)/doc/gdb-all.texi:
  579.     (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi)
  580. $(srcdir)/doc/rdl-apps.texi:
  581.     (cd $(srcdir)/doc; $(MAKE) rdl-apps.texi)
  582.  
  583. # Make copying.c from COPYING
  584. copying.c : COPYING copying.awk
  585.     awk -f copying.awk < COPYING > copying.c
  586.  
  587. version.c : Makefile.in
  588.     echo 'char *version = "$(VERSION)";' >version.c
  589.  
  590. # c-exp.tab.c is generated in srcdir from c-exp.y, then compiled in target
  591. # directory to c-exp.tab.o.
  592. c-exp.tab.o: ${srcdir}/c-exp.tab.c
  593. ${srcdir}/c-exp.tab.c : $(srcdir)/c-exp.y
  594.     @echo 'Expect 4 shift/reduce conflicts.'
  595.     ${YACC} $(srcdir)/c-exp.y
  596.     mv y.tab.c ${srcdir}/c-exp.tab.c
  597.  
  598. # m2-exp.tab.c is generated in srcdir from m2-exp.y, then compiled in target
  599. # directory to m2-exp.tab.o.
  600. m2-exp.tab.o: ${srcdir}/m2-exp.tab.c
  601. ${srcdir}/m2-exp.tab.c : $(srcdir)/m2-exp.y
  602.     ${YACC} $(srcdir)/m2-exp.y
  603.     mv y.tab.c ${srcdir}/m2-exp.tab.c
  604.  
  605. # dbxread, coffread, mipsread have dependencies on BFD header files.
  606. dbxread.o: ${srcdir}/dbxread.c
  607.     ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
  608.  
  609. coffread.o: ${srcdir}/coffread.c
  610.     ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
  611.  
  612. mipsread.o: ${srcdir}/mipsread.c
  613.     ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
  614.  
  615. # Drag in the files that are in another directory.
  616.  
  617. xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
  618.     ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c
  619.  
  620. xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
  621.     ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
  622.  
  623. xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
  624.     ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
  625.  
  626. xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
  627.     ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_regs.c
  628.  
  629. nindy.o: ${srcdir}/nindy-share/nindy.c
  630.     ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/nindy.c
  631.  
  632. Onindy.o: ${srcdir}/nindy-share/Onindy.c
  633.     ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/Onindy.c
  634.  
  635. ttybreak.o: ${srcdir}/nindy-share/ttybreak.c
  636.     ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttybreak.c
  637.  
  638. ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
  639.     ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttyflush.c
  640.  
  641. tdesc-lib/libdc.o : force_update
  642.     cd tdesc-lib ; ${MAKE} "SYSV_DEFINE=${SYSV_DEFINE}"
  643.  
  644. lint: $(LINTFILES)
  645.     $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES)
  646.  
  647. gdb.cxref: $(SFILES)
  648.     cxref -I. $(SFILES) >gdb.cxref
  649.  
  650. force_update :
  651.  
  652. # When used with GDB, the demangler should never look for leading
  653. # underscores because GDB strips them off during symbol read-in.  Thus
  654. # -Dnounderscore.  
  655.  
  656. cplus-dem.o : cplus-dem.c
  657.     ${CC} -c ${CFLAGS} -Dnounderscore \
  658.       `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'`
  659.  
  660. # GNU Make has an annoying habit of putting *all* the Makefile variables
  661. # into the environment, unless you include this target as a circumvention.
  662. # Rumor is that this will be fixed (and this target can be removed)
  663. # in GNU Make 4.0.
  664. .NOEXPORT:
  665.  
  666. # This is the end of "Makefile.in".  When built into "Makefile"
  667. # by the configure script, two things are added below this point:
  668. #     alldeps.mak -- defintions of all files that are used in
  669. #            host- or target-dependent configurations
  670. #    depend -- what .o files depend on what .c and .h files,
  671. #            for all configurations.
  672.  
  673.  
  674.